package com.edu.chat.facade.model.enums;

import lombok.Getter;

/**
 * @program: KQAIA
 * @description:
 * @author: 无恙
 * @create: 2025-03-23 18:27
 **/

@Getter
public enum SessionStatusEnum {

	//active
	ACTIVE("active","激活中会话"),

	//close
	CLOSE("close","关闭会话");


	private final String code;

	private final String desc;

	SessionStatusEnum (String code,String desc){
		this.code = code;
		this.desc = desc;
	}

	public SessionStatusEnum getCode(String code){
		for (SessionStatusEnum sessionStatusEnum : SessionStatusEnum.values()) {
			if (sessionStatusEnum.code.equals(code)) {
				return sessionStatusEnum;
			}
		}
		return null;
	}
}
